<?php

namespace Registro\Models;

class Instruments extends \Registro\Models\BaseModel {
    
    /**
     *
     * @var integer
     */
    public $instrument_id;

    /**
     *
     * @var string
     */
    public $instrument_name;

    /**
     *
     * @var integer
     */
    public $instruments_manufacturer_id;

    /**
     *
     * @var string
     */
    public $instrument_modified;

    /**
     *
     * @var integer
     */
    public $instrument_modified_by;

    /**
     *
     * @var string
     */
    public $instrument_created;

    /**
     *
     * @var integer
     */
    public $instrument_created_by;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {

        $this->hasMany( 'instrument_id', 'Reg_instruments_events', 'reg_instruments_events_instrument_id', array( 'alias' => 'Reg_instruments_events' ) );
        $this->hasMany( 'instrument_id', 'Reg_pictures', 'picture_instrument_id', array( 'alias' => 'Reg_pictures' ) );
        $this->belongsTo( 'instruments_manufacturer_id', 'Reg_manufacturers', 'manufacturer_id', array( 'alias' => 'Reg_manufacturers' ) );
        $this->belongsTo( 'instrument_created_by', 'Reg_users', 'user_id', array( 'alias' => 'Reg_users' ) );
        $this->belongsTo( 'instrument_modified_by', 'Reg_users', 'user_id', array( 'alias' => 'Reg_users' ) );
    }

}
